import { openBuildService } from '../../helper/service'

// 值类型为String或Object,String为url(method),Object同axios(config)参数支持相同,data和params只能为对象类型
const settings = {
    //选择单位下拉框
    getTypeList: {
        url: "/adminc/v1/config_manage/b_code/get_code_list",
        method: 'get'
    },
    //左侧单位信息列表
    getLeftList: {
        // url: "/adminc/v1/organization_manage/o_company/get_company_list",
        url: "/adminc/v1/organization_manage/o_company/get_company_tree",
        method: 'get'
    },
    //右侧单位信息列表
    getRightList: {
        url: "/adminc/v1/organization_manage/o_company_rela/get_company_rela_list",
        method: 'get'
    },
    //删除行
    deleteRow: {
        url: "/adminc/v1/organization_manage/o_company_rela/delete_company_rela",
        method: 'delete'
    },
    //新增关联数据表格
    relateTable: {
        url: "/adminc/v1/organization_manage/o_company/get_company_list",
        method: 'get'
    },
    //新增关联保存
    saveRelate: {
        url: "/adminc/v1/organization_manage/o_company_rela/batch_create_company_rela",
        method: 'post'
    },

    //  下面是新页面【单位关系维护(新)】的接口
    //  左边搜索1
    getLeftListAPI: {
        url: '/adminc/v1/organization_manage/o_company/companysList',
        method: 'post'
    },
    // 右边表格1
    getRightTableListAPI: {
        url: '/adminc/v1/organization_manage/o_company/comlist',
        method: 'post'
    },
    // 解除关联
    relieveUnitAPI: {
        url: '/adminc/v1/organization_manage/o_company/relieve',
        method: 'post'
    },
    // 弹窗表格1
    getRelationUnitDialogListAPI: {
        url: '/adminc/v1/organization_manage/o_company/relevanceList',
        method: 'post'
    },
    // 确认添加1
    addRelationUnitAPI: {
        url: '/adminc/v1/organization_manage/o_company/addRelation',
        method: 'post'
    }

}
export default openBuildService(settings)